| Total Complexity | 2 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import { |
||
| 24 | |||
| 25 | @Controller('pay_stubs') |
||
| 26 | @ApiUseTags('Accounting') |
||
| 27 | @ApiBearerAuth() |
||
| 28 | @UseGuards(AuthGuard('bearer'), RolesGuard) |
||
| 29 | export class CreatePayStubAction { |
||
| 30 | constructor( |
||
| 31 | @Inject('ICommandBus') |
||
| 32 | private readonly commandBus: ICommandBus |
||
| 33 | ) {} |
||
| 34 | |||
| 35 | @Post() |
||
| 36 | @Roles(UserRole.COOPERATOR, UserRole.EMPLOYEE) |
||
| 37 | @UseInterceptors(FileInterceptor('file')) |
||
| 38 | @ApiOperation({title: 'Create new paystub'}) |
||
| 39 | @ApiImplicitFile({ |
||
| 40 | name: 'file', |
||
| 41 | required: true |
||
| 42 | }) |
||
| 43 | public async index(@UploadedFile() file) { |
||
| 44 | try { |
||
| 45 | } catch (e) { |
||
| 46 | throw new BadRequestException(e.message); |
||
| 47 | } |
||
| 50 |